<div class="page">
	<div class="page-header">
		<h2><?php echo __('Emprestimos');?>		<small><?php echo __('Emprestimos');?></small></h2>
		<div class="page-header-fields">
					<?php echo $this->Html->link('<i class="icon-th-list icon-white"></i> '.__('List').' '.__('Emprestimos'), array('action' => 'index'), array('escape' => false, 'class' => 'btn btn-primary')); ?>
					<?php echo $this->Html->link('<i class="icon-pencil icon-white"></i> '.__('Edit').' '.__('Emprestimos'), array('action' => 'edit', $emprestimo['Emprestimo']['id']), array('escape' => false, 'class' => 'btn btn-primary')); ?>
		</div>
	</div>
	<div class="page-content">
		<h2><?php  echo __('Emprestimo');?></h2>
			<table class="table table-bordered table-striped">
			<tbody>
			<tr>
		<td><h5><?php echo __('Id'); ?></h5></td>
		<td>
			<?php echo h($emprestimo['Emprestimo']['id']); ?>
			&nbsp;
		</td>
	</tr>
	<tr>
		<td><h5><?php echo __('Projeto'); ?></h5></td>
		<td>
			<?php echo $this->Html->link($emprestimo['Projeto']['nome'], array('controller' => 'projetos', 'action' => 'view', $emprestimo['Projeto']['id'])); ?>
			&nbsp;
		</td>
	</tr>
	<tr>
		<td><h5><?php echo __('Aluno'); ?></h5></td>
		<td>
			<?php echo $this->Html->link($emprestimo['Aluno']['id'], array('controller' => 'alunos', 'action' => 'view', $emprestimo['Aluno']['id'])); ?>
			&nbsp;
		</td>
	</tr>
	<tr>
		<td><h5><?php echo __('Autorizador'); ?></h5></td>
		<td>
			<?php echo $this->Html->link($emprestimo['Autorizador']['id'], array('controller' => 'usuarios', 'action' => 'view', $emprestimo['Autorizador']['id'])); ?>
			&nbsp;
		</td>
	</tr>
	<tr>
		<td><h5><?php echo __('Data Inicio'); ?></h5></td>
		<td>
			<?php echo h($emprestimo['Emprestimo']['data_inicio']); ?>
			&nbsp;
		</td>
	</tr>
	<tr>
		<td><h5><?php echo __('Data Devolucao'); ?></h5></td>
		<td>
			<?php echo h($emprestimo['Emprestimo']['data_devolucao']); ?>
			&nbsp;
		</td>
	</tr>
	<tr>
		<td><h5><?php echo __('Finalidade'); ?></h5></td>
		<td>
			<?php echo h($emprestimo['Emprestimo']['finalidade']); ?>
			&nbsp;
		</td>
	</tr>
	<tr>
		<td><h5><?php echo __('Data Entrega'); ?></h5></td>
		<td>
			<?php echo h($emprestimo['Emprestimo']['data_entrega']); ?>
			&nbsp;
		</td>
	</tr>
	<tr>
		<td><h5><?php echo __('Situacao'); ?></h5></td>
		<td>
			<?php echo h($emprestimo['Emprestimo']['situacao']); ?>
			&nbsp;
		</td>
	</tr>
	<tr>
		<td><h5><?php echo __('Usuario'); ?></h5></td>
		<td>
			<?php echo $this->Html->link($emprestimo['Usuario']['id'], array('controller' => 'usuarios', 'action' => 'view', $emprestimo['Usuario']['id'])); ?>
			&nbsp;
		</td>
	</tr>
	<tr>
		<td><h5><?php echo __('Created'); ?></h5></td>
		<td>
			<?php echo h($emprestimo['Emprestimo']['created']); ?>
			&nbsp;
		</td>
	</tr>
	<tr>
		<td><h5><?php echo __('Modified'); ?></h5></td>
		<td>
			<?php echo h($emprestimo['Emprestimo']['modified']); ?>
			&nbsp;
		</td>
	</tr>
			</tbody>
			</table>
	</div>
	<div class="page-footer"></div>
</div>

<div class="actions">
	<h3><?php echo __('Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Edit Emprestimo'), array('action' => 'edit', $emprestimo['Emprestimo']['id'])); ?> </li>
		<li><?php echo $this->Form->postLink(__('Delete Emprestimo'), array('action' => 'delete', $emprestimo['Emprestimo']['id']), null, __('Are you sure you want to delete # %s?', $emprestimo['Emprestimo']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('List Emprestimos'), array('action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Emprestimo'), array('action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Projetos'), array('controller' => 'projetos', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Projeto'), array('controller' => 'projetos', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Alunos'), array('controller' => 'alunos', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Aluno'), array('controller' => 'alunos', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Usuarios'), array('controller' => 'usuarios', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Autorizador'), array('controller' => 'usuarios', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Itensemprestimos'), array('controller' => 'itensemprestimos', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Itensemprestimo'), array('controller' => 'itensemprestimos', 'action' => 'add')); ?> </li>
	</ul>
</div>
<div class="related">
	<h3><?php echo __('Related Itensemprestimos');?></h3>
	<?php if (!empty($emprestimo['Itensemprestimo'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php echo __('Id'); ?></th>
		<th><?php echo __('Quantidade'); ?></th>
		<th><?php echo __('Emprestimo Id'); ?></th>
		<th><?php echo __('Equipamento Id'); ?></th>
		<th class="actions"><?php echo __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($emprestimo['Itensemprestimo'] as $itensemprestimo): ?>
		<tr>
			<td><?php echo $itensemprestimo['id'];?></td>
			<td><?php echo $itensemprestimo['quantidade'];?></td>
			<td><?php echo $itensemprestimo['emprestimo_id'];?></td>
			<td><?php echo $itensemprestimo['equipamento_id'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View'), array('controller' => 'itensemprestimos', 'action' => 'view', $itensemprestimo['id'])); ?>
				<?php echo $this->Html->link(__('Edit'), array('controller' => 'itensemprestimos', 'action' => 'edit', $itensemprestimo['id'])); ?>
				<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'itensemprestimos', 'action' => 'delete', $itensemprestimo['id']), null, __('Are you sure you want to delete # %s?', $itensemprestimo['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Itensemprestimo'), array('controller' => 'itensemprestimos', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
